<template>
  <div>
    <div @click="fatherFn">
      <button @click.stop>阻止事件冒泡</button>
      <a @click.prevent.stop href="http://www.cctv.com">去购物 阻止默认行为</a>
      <button @click.once.stop="btn2">只触发一次</button>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    fatherFn() {
      console.log("父亲事件触发了");
    },

    btn2() {
      console.log("只触发一次");
    },
  },
};
</script>

<style>
</style>